package com.kitri.service;

import java.util.List;

import org.springframework.stereotype.Service;

import com.kitri.dao.*;
import com.kitri.domain.Certification;

@Service
public class CertificationServiceImpl implements CertificationService {
	private CertificationDao certificationDao = null;

	public CertificationServiceImpl() {
		this.certificationDao = ((CertificationDaoImpl) AppContext
				.getAppContext().getBean("certificationDao"));
	}

	@Override
	public boolean add(String certificationName) {
		return certificationDao.insert(certificationName);
	}

	@Override
	public boolean remove(String certificationId) {
		return certificationDao.delete(certificationId);
	}

	@Override
	public boolean update(Certification certification) {
		return certificationDao.update(certification);
	}

	@Override
	public List<Certification> list() {
		return certificationDao.selectAll();
	}
}
